<div class="row">
    <div class="col-lg-12 text-center">
        <div class="panel panel-default">
            <div class="panel-body">
                <div class="table-responsive">
                    <table class="table table-hover table-striped">
                        <thead>
                            <tr>
                                <th>Assignment #</th>
                                <th>Title</th>
                                <th>
                                    <button onclick="ajax_assignment(0);"
                                                 id="add_assignment_btn"
                                               name="add_assignment_btn"
                                               type="button"
                                              class="btn btn-sm btn-success">
                                    <i class="fa fa-plus"></i> Add
                                </button>
                                </th>
                            </tr>
                        </thead>
                        <tbody>
                        {% for assignment in assignments %}
                            <tr>
                                <td align="left" valign="left">{{ assignment.assignment_num }}</td>
                                <td align="left" valign="left">{{ assignment.title }}</td>
                                <td align="left" valign="left">
                                <button onclick="view_assignment({{ assignment.assignment_id }});"
                                             id="view_{{ assignment.assignment_id }}_btn"
                                           name="view_{{ assignment.assignment_id }}_btn"
                                           type="button"
                                          class="btn btn-sm btn-primary">
                                        <i class="fa fa-level-down"></i> Questions
                                </button>
                                <button onclick="ajax_assignment({{ assignment.assignment_id }});"
                                             id="edit_{{ assignment.assignment_id }}_btn"
                                           name="edit_{{ assignment.assignment_id }}_btn"
                                           type="button"
                                          class="btn btn-sm btn-warning">
                                        <i class="fa fa-pencil"></i> Edit
                                </button>
                                <button onclick="ajax_delete_assignment({{ assignment.assignment_id }});"
                                             id="del_{{ assignment.assignment_id }}_btn"
                                           name="del_{{ assignment.assignment_id }}_btn"
                                           type="button"
                                          class="btn btn-sm btn-danger">
                                    <i class="fa fa-minus"></i> Delete
                                </button>
                                </td>
                            </tr>
                    {% endfor %}
                    </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>